-
Notifications
You must be signed in to change notification settings - Fork 1
Fix Feed state not fully cleared on feed deleted #147
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
PR checklist ✅All required conditions are satisfied:
🎉 Great job! This PR is ready for review. |
SDK Size Comparison 📏
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes an issue where the feed state was not being completely cleared when a feed is deleted, ensuring all stateful properties are properly reset.
Key Changes:
- Added clearing of
aggregatedActivities,pinnedActivities,notificationStatus, andactivitiesPaginationin theonFeedDeleted()method - Updated the test to verify these additional state properties are cleared
- Changed test assertions from
assertEquals(emptyList<T>(), ...)toassertTrue(...isEmpty())for cleaner readability
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| FeedStateImpl.kt | Added clearing of previously missed state properties (aggregatedActivities, pinnedActivities, notificationStatus, activitiesPagination) in the onFeedDeleted() method |
| FeedStateImplTest.kt | Enhanced test coverage for onFeedDeleted() to verify all state properties are cleared, including the newly added ones |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
...oid-client/src/main/kotlin/io/getstream/feeds/android/client/internal/state/FeedStateImpl.kt
Show resolved
Hide resolved
80b3048 to
ffc88a6
Compare
|



Goal
We're not fully clearing the state on feed deleted, but we should.
Implementation
Clear state that we were not clearing.
Testing
Not sure how feasible this is to do manually, but you'd have to observe all properties of a
Feed, then delete it and verify they're all reset.Checklist